# 存储所有的任务

from utils.celery_task.celery import app
from ronglian_sms_sdk import SmsSDK

from django.conf import settings

import json


@app.task
def send_message(sms_code, moblie, expire=5):
    sms_sdk = SmsSDK(accId=settings.ACCID, accToken=settings.ACCTOKEN, appId=settings.APPID)
    tid = "1"
    datas = (sms_code,expire)
    resp = sms_sdk.sendMessage(tid,moblie,datas)
    resp = json.loads(resp)
    return resp
